package com.chagee.store.operation.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum NoSuchItemEnum {
	NO(0, "未选无此项"),
	YES(1, "选择无此项");

	private final Integer type;
	private final String desc;

	public static NoSuchItemEnum queryByType(Integer type) {
		for (NoSuchItemEnum value : values()) {
			if (Objects.equals(type, value.getType())) {
				return value;
			}
		}
		return null;
	}
}
